import { sm2 } from 'miniprogram-sm-crypto'

const pubK =
  '04d98cce567ac12d590ed5038e5f6c3db105ca19eef666f35802f92edcddd7e2b9835f3e2eec7e7f25daf33762bf693c708c1db4a38b0d5b20e17c0153b33b67e7'
const cipherMode = 1

/**
 * sm2 加密
 */
export function doEncrypt(msgString: string): string {
  return sm2.doEncrypt(msgString, pubK, cipherMode) // 加密结果
}
